-- card: 13817 from stack: in.6 -- bmap block id: 14002 -- flags: 0000 -- background id: 16130 -- name: PICT Maker Menu ----- HyperTalk script ----- on turnOn buttonNo lock screen repeat with counter = 1 to 3 if buttonNo = counter then set the hilite of cd btn counter to TRUE show cd fld counter else set the hilite of cd btn counter to FALSE hide cd fld counter end if end repeat set scroll of cd fld buttonNo to 0 show cd btn "Close Information" unlock screen with visual effect dissolve end turnOn on closeall set cursor to watch lock screen repeat with x = 1 to 3 hide cd fld x set hilite of cd btn x to FALSE end repeat hide cd btn "Close Information" unlock screen with visual effect dissolve end closeall on closecard closeall end closecard -- part 1 (button) -- low flags: 00 -- high flags: A004 -- rect: left=17 top=90 right=112 bottom=194 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: What is PICT Maker? ----- HyperTalk script ----- on mouseUp if the visible of cd fld (the number of me) then closeall else put the number of me into displayinfo turnOn displayinfo end if end mouseUp -- part 2 (button) -- low flags: 00 -- high flags: A004 -- rect: left=17 top=120 right=142 bottom=194 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: How to use PICT Maker? ----- HyperTalk script ----- on mouseUp if the visible of cd fld (the number of me) then closeall else put the number of me into displayinfo turnOn displayinfo end if end mouseUp -- part 3 (button) -- low flags: 00 -- high flags: A004 -- rect: left=17 top=150 right=172 bottom=194 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Future Enhancements ----- HyperTalk script ----- on mouseUp if the visible of cd fld (the number of me) then closeall else put the number of me into displayinfo turnOn displayinfo end if end mouseUp -- part 4 (button) -- low flags: 00 -- high flags: A004 -- rect: left=17 top=180 right=202 bottom=194 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Use PICT Maker ----- HyperTalk script ----- on mouseUp visual dissolve fast go cd "PICT Maker 2" end mouseUp -- part 5 (button) -- low flags: 00 -- high flags: A004 -- rect: left=17 top=210 right=232 bottom=194 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Print PICT Maker Docs ----- HyperTalk script ----- on mouseUp put cd fld 1 & return & cd fld 2 & return & cd fld 3 into container put "PICT Maker Documentation" into prompt PrintDoc prompt,container,prompt,times,12 end mouseUp -- part 6 (field) -- low flags: 81 -- high flags: 2007 -- rect: left=203 top=69 right=271 bottom=500 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: ----- HyperTalk script ----- on mouseDown set the lockText of me to false click at the clickLoc click at the clickLoc put selection into theSelect if theSelect ≠ "Click here to go there" then click at loc of target else go cd "Auxiliary X-Commands" send mouseUp to cd btn "ColorOn XFCN" end if set the lockText of me to true end mouseDown -- part 7 (button) -- low flags: 80 -- high flags: A004 -- rect: left=283 top=278 right=299 bottom=434 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Close Information ----- HyperTalk script ----- on mouseUp closeall end mouseUp -- part 8 (field) -- low flags: 81 -- high flags: 2007 -- rect: left=203 top=69 right=271 bottom=500 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: ----- HyperTalk script ----- on mouseUp end mouseup -- part 10 (field) -- low flags: 81 -- high flags: 2007 -- rect: left=203 top=69 right=271 bottom=500 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: ----- HyperTalk script ----- on mouseUp end mouseup -- part contents for card part 6 ----- text ----- ShowDialog XCMD supports very sophisticated handling of PICT resources for the display of graphics within ShowDialog dialog boxes. Ordinarily, you would create your graphic in a paint application such as MacPaint™ or SuperPaint™ and copy the artwork into a stack using ResEdit. HyperCard itself is an excellent painting application. So if you prefer, you can prepare your artwork in this stack. PICT Maker will convert your artwork into a PICT resource and save it into this stack. Since HyperCard's painting tools are limited to black & white, if you wish to make color PICTs you'll still have to use ResEdit to install them into a stack. Color PICTs can be created using programs such as PixelPaint™ and Studio 8 or any of the other color paint programs available for the Mac II. After creating the color graphic, select it and copy it to the clipboard. Open the "destination" stack with ResEdit and paste in the graphic as a PICT resource. Be sure to test your finished dialog that contains a color PICT in B&W mode to make sure that the PICT still looks "allright" in B&W. There doesn't seem to be any rule-of-thumb for predicting how certain colors will look when displayed in B&W. You just have to try it and see. Your better alternative is to employ the ColorOn XFCN that is included in this stack to test if your monitor is in color mode or not. If it is, show a dialog containing a color PICT; if it's in B&W mode, show another dialog, containing an identical, but B&W PICT. That way you can have your cake and eat it too! See the card "Auxiliary X-Commands" for a description of ColorOn XFCN. • Click here to go there. • -- part contents for card part 8 ----- text ----- PICT Maker uses an XFCN called Ants that returns the coordinates of a rectangle drawn out with the mouse and an XMCD called ClipToPICT to copy whatever picture is on the clipboard into a PICT resource and place it in the current stack. The arguments of ClipToPICT XCMD are: ClipToPICT , where is the resource ID number for the new PICT; is the name of the new PICT resource. If you pass "0" (that's a zero) as the first parameter, ClipToPICT will assign its own unique ID to the new resource. If you leave the second parameter empty (that doesn't mean that you can OMIT the second parameter) then the new PICT will be unnamed. If everything goes alright the ID of the new PICT resource will be returned in "the result." If something goes wrong the following errors are returned in the result: Error: You must provide 2 parameters (PICT ID and name)! Error: That PICT resource ID already exists! Error: That PICT name already exists! Error: There isn't a picture on the clipboard! Error: Unable to open the stack! Any disk related errors will be reported by Error: where is one of the standard Macintosh operating system error codes. The ones that you potentially will encounter with ClipToPICT are: -34: disk full -44: disk locked -61: file locked As you can deduce from the error messages, ClipToPICT will not write over a previously existing PICT resource if it has the same ID or name as the new one. If there isn't anything on the clipboard (or there is text), ClipToPICT will exit without creating a resource. Ants XFCN 1.1 and ClipToPICT XCMD 1.11 are Copyright© 1988 by Jay Hodgdon -- part contents for card part 10 ----- text ----- Stay tuned for a GREATLY enhanced resource creator/mover!